package com.yingxin.yxerp.module.dingtalk.entity.enums;

/**
 * 工龄区间
 */

public enum WeComDurationRange {

    ONE(1,"0.5年以下"),
    TWO(2,"0.5-1年"),
    THREE(3,"1-3年"),
    FOUR(4,"3-5年"),
    FIVE(5,"5-10年"),
    SIX(6,"10年以上"),
    ;

    private Integer durationRange;

    private String durationRangeName;

    WeComDurationRange(Integer durationRange, String durationRangeName) {
        this.durationRange = durationRange;
        this.durationRangeName = durationRangeName;
    }

    public Integer getDurationRange() {
        return durationRange;
    }

    public void setDurationRange(Integer durationRange) {
        this.durationRange = durationRange;
    }

    public String getDurationRangeName() {
        return durationRangeName;
    }

    public void setDurationRangeName(String durationRangeName) {
        this.durationRangeName = durationRangeName;
    }

    public static WeComDurationRange getEnum(Integer durationRange) {
        if( durationRange == null ){
            return null;
        }
        for (WeComDurationRange i : WeComDurationRange.values()) {
            if ( i.getDurationRange() == durationRange ) {
                return i;
            }
        }
        return null;
    }

}
